<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/xhtml">

    <head>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title><?php echo C('WEB_TITLE');?></title>

        <link rel="stylesheet" href="/Public/css/common.css"/>

        <link rel="stylesheet" href="/Public/crm/css/style.css"/>

        <link rel="stylesheet" href="/Public/crm/css/index.css"/>

        <link rel="stylesheet" type="text/css" href="/Public/js/layui/css/layui.css"/>

        <link rel="stylesheet" href="<?php echo C('PC_ICON_HTTP');?>">

        <script type="text/javascript" src="/Public/js/jquery-1.9.1.min.js"></script>

        <script type="text/javascript" src="/Public/js/lang/<?php echo (getStrToLower(cookie('think_language'))); ?>.js"></script>

        <script type="text/javascript" src="/Public/crm/js/index.js"></script>

        <script type="text/javascript" src="/Public/js/layer/layer.js"></script>

        <script type="text/javascript" src="/Public/js/layui/layui.js"></script>

    </head>

    <body>

		<div class="feelcrm-leftMenu">

			<?php if($source_type != 'Feelec'): ?><div class="feelcrm-menu-first">

					<div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu1 first-menu-logo">

						<a href="<?php echo U('Index/welcome');?>" target='CrmBox' title="<?php echo L('HOMEPAGE');?>">

							<img src="<?php echo ((isset($index["firmLogo"]) && ($index["firmLogo"] !== ""))?($index["firmLogo"]):'/Public/img/feelCrm.png'); ?>" alt="">

						</a>

					</div>

				</div>

			<?php else: ?>

				<div class="feelcrm-menu-first">

					<div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu1 first-menu-logo">数据分析</div>

				</div><?php endif; ?>

			<?php if(is_array($menusCrm)): foreach($menusCrm as $key=>$v1): if($source_type === 'Feelec'): ?><div class="feelcrm-menu-first">
<!--

							<div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu1">

								<i class="iconfont <?php echo ($v1["menu_icon"]); ?>"></i>

								<span><?php echo ($v1["menu_name"]); ?> <i class="layui-icon arrow">&#xe602;</i></span>

							</div>
-->

							<div class="feelcrm-menu-second" style="display: block">

								<div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu2 feelcrm-leftMenu-menuActive-second" style="padding-left: 30px">

									<a href="<?php echo U('Index/welcome');?>" onclick="feelcrmActive(this,2)" target='CrmBox'>概述</a>

								</div>

							</div>

							<?php if(is_array($v1["childMenu"])): foreach($v1["childMenu"] as $key=>$v2): if(($crmsite['customerReseller'] != 1 && in_array($v2['menu_action'],array('customer/agent','Analysis/customer_shipment','defineForm/shipment'))) || (in_array($v2['menu_action'],array('examine/customer','schedule/customer_examine')) && ($crmsite['customerExamine'] != 1 || !$isExamineCustomerAuth))): else: ?>

									<div class="feelcrm-menu-second" style="display: block">

										<div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu2" style="padding-left: 30px">

											<?php if(($v2["menu_action"]) == "CrmMenuL"): ?><span><?php echo ($v2["menu_name"]); ?> <i class="layui-icon arrow">&#xe602;</i></span>

												<?php else: ?>

												<a href="<?php echo U($v2['menu_action']);?>" onclick="feelcrmActive(this,2)" target='CrmBox'>

													<?php echo ($v2["menu_name"]); ?>

												</a><?php endif; ?>

										</div>

										<div class="feelcrm-menu-third">

											<?php if(is_array($v2["childMenu"])): foreach($v2["childMenu"] as $key=>$v3): ?><div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu3">

													<?php if(($v3["menu_action"]) == "CrmMenuL"): ?><span><li><?php echo ($v3["menu_name"]); ?> </li></span>

														<?php else: ?>

														<a href="<?php echo U($v3['menu_action']);?>" onclick="feelcrmActive(this,3)" target='CrmBox'><li><?php echo ($v3["menu_name"]); ?></li></a><?php endif; ?>

												</div><?php endforeach; endif; ?>

										</div>

									</div><?php endif; endforeach; endif; ?>

						</div>

				<?php else: ?>

					<div class="feelcrm-menu-first">

							<div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu1">

								<i class="iconfont <?php echo ($v1["menu_icon"]); ?>"></i>

								<span><?php echo ($v1["menu_name"]); ?> <i class="layui-icon arrow">&#xe602;</i></span>

							</div>

							<?php if(is_array($v1["childMenu"])): foreach($v1["childMenu"] as $key=>$v2): if(($crmsite['customerReseller'] != 1 && in_array($v2['menu_action'],array('customer/agent','Analysis/customer_shipment','defineForm/shipment'))) || (in_array($v2['menu_action'],array('examine/customer','schedule/customer_examine')) && ($crmsite['customerExamine'] != 1 || !$isExamineCustomerAuth))): else: ?>

									<div class="feelcrm-menu-second">

										<div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu2">

											<?php if(($v2["menu_action"]) == "CrmMenuL"): ?><span><?php echo ($v2["menu_name"]); ?> <i class="layui-icon arrow">&#xe602;</i></span>

												<?php else: ?>

												<a href="<?php echo U($v2['menu_action']);?>" onclick="feelcrmActive(this,2)" target='CrmBox'>

													<?php echo ($v2["menu_name"]); ?>

													<?php if(($v1["menu_action"]) == "CrmSchedule"): ?><span class="schedule-num">0</span><?php endif; ?>

												</a><?php endif; ?>

										</div>

										<div class="feelcrm-menu-third">

											<?php if(is_array($v2["childMenu"])): foreach($v2["childMenu"] as $key=>$v3): ?><div class="feelcrm-leftMenu-menu feelcrm-leftMenu-menu3">

													<?php if(($v3["menu_action"]) == "CrmMenuL"): ?><span><li><?php echo ($v3["menu_name"]); ?> </li></span>

														<?php else: ?>

														<a href="<?php echo U($v3['menu_action']);?>" onclick="feelcrmActive(this,3)" target='CrmBox'><li><?php echo ($v3["menu_name"]); ?></li></a><?php endif; ?>

												</div><?php endforeach; endif; ?>

										</div>

									</div><?php endif; endforeach; endif; ?>

						</div><?php endif; endforeach; endif; ?>

		</div>

		<script type="text/javascript">

			//客户端
			if ( navigator.userAgent.toLowerCase().indexOf('electron/') > -1)
			{
				top.setIframe(document);
			}

			$(function(){

				$('.feelcrm-menu-first').unbind('click').click(function(){

					if($(this).find('.feelcrm-menu-second').is(":hidden"))
					{
						$(this).find('.feelcrm-menu-second').slideDown(300);

						$(this).find('.feelcrm-leftMenu-menu1 .layui-icon').html('&#xe61a;');

					}else
					{
						$(this).find('.feelcrm-menu-second').slideUp(300);

						$(this).find('.feelcrm-leftMenu-menu1 .layui-icon').html('&#xe602;');
					}
					event.stopPropagation();
				})

				$('.feelcrm-menu-second').unbind('click').click(function()
				{
					if($(this).find('.feelcrm-menu-third').is(":hidden"))
					{
						$(this).find('.feelcrm-menu-third').slideDown(300);

						$(this).find('.feelcrm-leftMenu-menu2 .layui-icon').html('&#xe61a;');
					}
					else
					{
						$(this).find('.feelcrm-menu-third').slideUp(300);

						$(this).find('.feelcrm-leftMenu-menu2 .layui-icon').html('&#xe602;');
					}
					event.stopPropagation();
				})

				$('.first-menu-logo a').click(function(){

					$('.feelcrm-menu-third a').removeClass('feelcrm-leftMenu-menuActive-third');

					$('.feelcrm-menu-second .feelcrm-leftMenu-menu2').removeClass('feelcrm-leftMenu-menuActive-second');

				})
			})

			function feelcrmActive(obj,type)
			{
				if(type == 2)
				{
					$('.feelcrm-menu-third a').removeClass('feelcrm-leftMenu-menuActive-third');

					$('.feelcrm-menu-second .feelcrm-leftMenu-menu2').removeClass('feelcrm-leftMenu-menuActive-second');

					$(obj).parent().addClass('feelcrm-leftMenu-menuActive-second');
				}
				else if(type == 3)
				{
					$('.feelcrm-menu-third a').removeClass('feelcrm-leftMenu-menuActive-third');

					$('.feelcrm-menu-second .feelcrm-leftMenu-menu2').removeClass('feelcrm-leftMenu-menuActive-second');

					$(obj).addClass('feelcrm-leftMenu-menuActive-third');
				}
				event.stopPropagation();
			}

		</script>

    </body>

</html>